﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CreateStaticHtml.Models;

namespace CreateStaticHtml.Interface
{
    public interface ISection
    {
        #region 默认接口

        /// <summary>
        /// 得到所有 段落在大项目中尽量少用，这个方法返回的数据量过于庞大
        /// </summary>
        /// <returns>所有段落</returns>
        List<Section> GetList();

        /// <summary>
        /// 分页显示段落
        /// </summary>
        /// <param name="PageSize">每页记录数</param>
        /// <param name="NowPage">当前页</param>
        /// <param name="PageCount">总共多少页</param>
        /// <param name="recordCount">总记录数</param>
        /// <returns>查询到的记录</returns>
        List<Section> GetListByPage(int PageSize, int NowPage, out int PageCount, out int recordCount);

        /// <summary>
        /// 分页模糊查询段落
        /// </summary>
        /// <param name="section">对象实体</param>
        /// <param name="PageSize">每页记录数</param>
        /// <param name="NowPage">当前页</param>
        /// <param name="PageCount">总共多少页</param>
        /// <param name="recordCount">总记录数</param>
        /// <returns>查询到的记录</returns>
        List<Section> GetListByPageLikeKey(Section section, int PageSize, int NowPage, out int PageCount, out int recordCount);

        /// <summary>
        /// 分页查询段落
        /// </summary>
        /// <param name="section">对象实体</param>
        /// <param name="PageSize">每页记录数</param>
        /// <param name="NowPage">当前页</param>
        /// <param name="PageCount">总共多少页</param>
        /// <param name="recordCount">总记录数</param>
        /// <returns>查询到的记录</returns>
        List<Section> GetListByPageAndKeys(Section section, int PageSize, int NowPage, out int PageCount, out int recordCount);

        /// <summary>
        /// 得到一个段落
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns>对象</returns>
        Section GetModel(int id);

        /// <summary>
        /// 保存一个段落
        /// </summary>
        /// <param name="section">对象实体</param>
        /// <returns>编号</returns>
        int Insert(Section section);

        /// <summary>
        /// 按关键字查询头几条
        /// </summary>
        /// <param name="count">数量</param>
        /// <returns>段落的列表</returns>
        List<Section> GetTopList(int count);

        /// <summary>
        /// 判断段落是否唯一存在
        /// </summary>
        /// <param name="section">对象实体</param>
        /// <returns>是否存在</returns>
        bool IsExist(Section section);

        /// <summary>
        /// 判断段落是否存在
        /// </summary>
        /// <param name="section">对象实体</param>
        /// <returns>是否存在</returns>
        bool IsJustExist(Section section);

        /// <summary>
        /// 得到关键字等于。。。的所有段落
        /// </summary>
        /// <param name="section">对象实体</param>
        /// <returns>段落的List</returns>
        List<Section> GetSomeObject(Section section);

        /// <summary>
        /// 编辑一个段落
        /// </summary>
        /// <param name="section">对象实体</param>
        void Edit(Section section);

        /// <summary>
        /// 删除一个段落
        /// </summary>
        /// <param name="section">对象实体</param>
        void Delete(Section section);

        /// <summary>
        /// 删除所有段落
        /// </summary>
        void DeleteAll();

        /// <summary>
        /// 按关键字删除
        /// </summary>
        /// <param name="section">对象实体</param>
        void DeleteColumByKey_Value(Section section);

        #endregion

        #region 自定义接口


        #endregion

    }
}
